import {
  GOAL,
  HALF_GOAL,
  HOME_GOAL,
  GUEST_GOAL,
  HALE_HOME_GOAL,
  HALF_GUEST_GOAL,
  CORNER,
  HALF_CORNER,
  HOME_CORNER,
  GUEST_CORNER,
  HALE_HOME_CORNER,
  HALF_GUEST_CORNER,
  YELLO_CARD,
  HALF_YELLO_CARD,
  HOME_YELLO_CARD,
  GUEST_YELLO_CARD,
  HALF_HOME_YELLO_CARD,
  HALF_GUEST_YELLO_CARD,
  RANG_BALL,
  HALF_RANG_BALL,
  RANG_CORNER,
  HALF_RANG_CORNER,
  RANG_YELLOW_CARD,
  HALF_RANG_YELLOW_CARD,
  BOTH_GOAL,
  ONE_HALF_BOTH_GOAL,
  TWO_HALF_BOTH_GOAL,
  RIGHT_SCORE,
  RIGHT_SCORE_ONE_HALF,
  RIGHT_SCORE_TWO_HALF,
  MORE_GOAL_HALF,
  WIN_DRAW_LOSE,
  ONE_HALF_WIN_DRAW_LOSE,
  TWO_HALF_WIN_DRAW_LOSE,
  RIGHT_SCORE_V2,
} from '../const/index'
// 生成词汇表
export const getWords = () => {
  // 文本内容需要同步盘口
  const words = [
    // 大小球
    GOAL,
    HALF_GOAL,
    HOME_GOAL,
    GUEST_GOAL,
    HALE_HOME_GOAL,
    HALF_GUEST_GOAL,
    // 角球
    CORNER,
    HALF_CORNER,
    HOME_CORNER,
    GUEST_CORNER,
    HALE_HOME_CORNER,
    HALF_GUEST_CORNER,
    // 罚牌
    YELLO_CARD,
    HALF_YELLO_CARD,
    HOME_YELLO_CARD,
    GUEST_YELLO_CARD,
    HALF_HOME_YELLO_CARD,
    HALF_GUEST_YELLO_CARD,
    // 让球 让角 让牌
    RANG_BALL,
    HALF_RANG_BALL,
    RANG_CORNER,
    HALF_RANG_CORNER,
    RANG_YELLOW_CARD,
    HALF_RANG_YELLOW_CARD,
    // 双进
    BOTH_GOAL,
    ONE_HALF_BOTH_GOAL,
    TWO_HALF_BOTH_GOAL,
    // 比分
    RIGHT_SCORE,
    RIGHT_SCORE_ONE_HALF,
    RIGHT_SCORE_TWO_HALF,
    // 最多进球半场
    MORE_GOAL_HALF,
    // 胜平负
    WIN_DRAW_LOSE,
    ONE_HALF_WIN_DRAW_LOSE,
    TWO_HALF_WIN_DRAW_LOSE,
  ];
  const mapWords: Record<string, string[]> = {};
  const char = "n";
  const daxiao = ["大", "小"];
  words.forEach((word) => {
    /** ************************* 大小球 start ******************************** */
    // 大/小
    if (word === GOAL) {
      let goalWords: string[] = [];
      daxiao.forEach((dx) => {
        goalWords = goalWords.concat([
          `${dx}${char}`,
          `全${dx}${char}`,
          `全场${dx}${char}`,
          `全场${dx}球${char}`,
          `全场${dx}${char}球`,
          `${dx}${char}球`,
        ]);
      });

      mapWords[GOAL] = goalWords;
    }

    // 半场:大/小
    if (word === HALF_GOAL) {
      let halfGoalWords: string[] = [];
      daxiao.forEach((dx) => {
        halfGoalWords = halfGoalWords.concat([
          `半场${dx}${char}`,
          `半${dx}${char}`,
          `半${dx}${char}球`,
          `半${dx}球${char}`,
          `${dx}${char}半场`,
        ]);
      });

      mapWords[HALF_GOAL] = halfGoalWords;
    }

    // 主队:大/小
    if (word === HOME_GOAL) {
      let mywords: string[] = [];
      daxiao.forEach((dx) => {
        mywords = mywords.concat([
          `主${dx}${char}球`,
          `主${dx}${char}`,
          `主队${dx}${char}`,
          `主队${dx}${char}球`,
        ]);
      });

      mapWords[HOME_GOAL] = mywords;
    }

    // 客队大小
    if (word === GUEST_GOAL) {
      let mywords: string[] = [];
      daxiao.forEach((dx) => {
        mywords = mywords.concat([
          `客${dx}${char}球`,
          `客${dx}${char}`,
          `客队${dx}${char}`,
          `客队${dx}${char}球`,
        ]);
      });

      mapWords[GUEST_GOAL] = mywords;
    }

    // 半场主队:大/小
    if (word === HALE_HOME_GOAL) {
      let mywords: string[] = [];
      daxiao.forEach((dx) => {
        ["主", "主队", "主对"].forEach((zd) => {
          mywords = mywords.concat([
            `${zd}半${dx}${char}球`,
            `半场${zd}${dx}${char}球`,
            `半${zd}${dx}${char}球`,
          ]);
        });
      });

      mapWords[HALE_HOME_GOAL] = mywords;
    }

    // 半场客队:大/小
    if (word === HALF_GUEST_GOAL) {
      let mywords: string[] = [];
      daxiao.forEach((dx) => {
        ["客", "客队", "客对"].forEach((zd) => {
          mywords = mywords.concat([
            `${zd}半${dx}${char}球`,
            `半场${zd}${dx}${char}球`,
            `半${zd}${dx}${char}球`,
          ]);
        });
      });

      mapWords[HALF_GUEST_GOAL] = mywords;
    }

    /** ************************* 大小球 end ******************************** */

    /** ************************* 角球 start ******************************** */
    // 大/小
    if (word === CORNER) {
      let mywords: string[] = [];
      daxiao.forEach((dx) => {
        ["角", "脚"].forEach((jq) => {
          mywords = mywords.concat([
            `${dx}${char}${jq}`,
            `全${dx}${char}${jq}`,
            `全场${dx}${char}${jq}`,
            `全场${dx}${jq}${char}`,
            `全场${dx}${char}${jq}`,
            `${dx}${char}${jq}`,
          ]);
        });
      });

      mapWords[CORNER] = mywords;
    }

    // 角球：半场:大/小
    if (word === HALF_CORNER) {
      let halfGoalWords: string[] = [];
      daxiao.forEach((dx) => {
        ["角", "脚"].forEach((jq) => {
          halfGoalWords = halfGoalWords.concat([
            `半场${dx}${char}${jq}`,
            `半${dx}${char}${jq}`,
            `半${dx}${jq}${char}`,
            `${dx}${char}${jq}半场`,
          ]);
        });
      });

      mapWords[HALF_CORNER] = halfGoalWords;
    }

    // 主队:大/小角球
    if (word === HOME_CORNER) {
      let mywords: string[] = [];
      daxiao.forEach((dx) => {
        ["角", "脚", "角球", "脚球"].forEach((jq) => {
          mywords = mywords.concat([
            `主${dx}${char}${jq}`,
            `主队${dx}${char}${jq}`,
            `主队${char}${jq}`,
            `主大${jq}${char}`,
          ]);
        });
      });

      mapWords[HOME_CORNER] = mywords;
    }

    // 客队大小
    if (word === GUEST_CORNER) {
      let mywords: string[] = [];
      daxiao.forEach((dx) => {
        ["角", "脚", "角球", "脚球"].forEach((jq) => {
          mywords = mywords.concat([
            `客${dx}${char}${jq}`,
            `客队${dx}${char}${jq}`,
            `客队${char}${jq}`,
            `客大${jq}${char}`,
          ]);
        });
      });

      mapWords[GUEST_CORNER] = mywords;
    }

    // 半场主队角球大小
    if (word === HALE_HOME_CORNER) {
      let mywords: string[] = [];
      daxiao.forEach((dx) => {
        ["角", "脚", "角球", "脚球"].forEach((jq) => {
          ["主队", "主"].forEach((zd) => {
            mywords = mywords.concat([
              `${zd}半${dx}${char}${jq}`,
              `半场${zd}${dx}${char}${jq}`,
            ]);
          });
        });
      });

      mapWords[HALE_HOME_CORNER] = mywords;
    }
    // 半场客队角球大小
    if (word === HALF_GUEST_CORNER) {
      let mywords: string[] = [];
      daxiao.forEach((dx) => {
        ["角", "脚", "角球", "脚球"].forEach((jq) => {
          ["客队", "客"].forEach((zd) => {
            mywords = mywords.concat([
              `${zd}半${dx}${char}${jq}`,
              `半场${zd}${dx}${char}${jq}`,
            ]);
          });
        });
      });

      mapWords[HALF_GUEST_CORNER] = mywords;
    }

    /** ************************* 角球 end ******************************** */

    /** ************************* 罚牌 start ******************************** */
    // 罚牌
    if (word === YELLO_CARD) {
      let mywords: string[] = [];
      daxiao.forEach((dx) => {
        ["罚牌", "牌", "牌子"].forEach((fp) => {
          mywords = mywords.concat([
            `${dx}${char}${fp}`,
            `全${dx}${char}${fp}`,
            `全场${dx}${char}${fp}`,
            `${fp}${dx}${char}`,
            `${dx}${fp}${char}`,
          ]);
        });
      });

      mapWords[YELLO_CARD] = mywords;
    }

    // 罚牌：半场:大/小
    if (word === HALF_YELLO_CARD) {
      let mywords: string[] = [];
      daxiao.forEach((dx) => {
        ["罚牌", "牌", "牌子"].forEach((fp) => {
          mywords = mywords.concat([
            `半${dx}${char}${fp}`,
            `半场${dx}${char}${fp}`,
          ]);
        });
      });

      mapWords[HALF_YELLO_CARD] = mywords;
    }

    // 主队:大/小罚牌
    if (word === HOME_YELLO_CARD) {
      let mywords: string[] = [];
      daxiao.forEach((dx) => {
        ["罚牌", "牌", "牌子"].forEach((fp) => {
          mywords = mywords.concat([
            `主${dx}${char}${fp}`,
            `主队${dx}${char}${fp}`,
            `主队${char}${fp}`,
            `主${dx}${fp}${char}`,
            `主全${dx}${char}${fp}`,
            `主全场${dx}${char}${fp}`,
          ]);
        });
      });

      mapWords[HOME_YELLO_CARD] = mywords;
    }

    // 客队:大/小罚牌
    if (word === GUEST_YELLO_CARD) {
      let mywords: string[] = [];
      daxiao.forEach((dx) => {
        ["罚牌", "牌", "牌子"].forEach((fp) => {
          mywords = mywords.concat([
            `客${dx}${char}${fp}`,
            `客队${dx}${char}${fp}`,
            `客队${char}${fp}`,
            `客${dx}${fp}${char}`,
            `客全${dx}${char}${fp}`,
            `客全场${dx}${char}${fp}`,
          ]);
        });
      });

      mapWords[GUEST_YELLO_CARD] = mywords;
    }

    // 主半大小罚牌
    if (word === HALF_HOME_YELLO_CARD) {
      let mywords: string[] = [];
      daxiao.forEach((dx) => {
        ["罚牌", "牌", "牌子"].forEach((fp) => {
          ["主队", "主"].forEach((zd) => {
            mywords = mywords.concat([
              `${zd}半${dx}${char}${fp}`,
              `半场${zd}${dx}${char}${fp}`,
            ]);
          });
        });
      });

      mapWords[HALF_HOME_YELLO_CARD] = mywords;
    }
    // 客半大小罚牌
    if (word === HALF_GUEST_YELLO_CARD) {
      let mywords: string[] = [];
      daxiao.forEach((dx) => {
        ["罚牌", "牌", "牌子"].forEach((fp) => {
          ["客队", "客"].forEach((zd) => {
            mywords = mywords.concat([
              `${zd}半${dx}${char}${fp}`,
              `半场${zd}${dx}${char}${fp}`,
            ]);
          });
        });
      });

      mapWords[HALF_GUEST_YELLO_CARD] = mywords;
    }

    /** ************************* 罚牌 end ******************************** */

    /** ************************* 让球 start ******************************** */
    if (word === RANG_BALL) {
      let mywords: string[] = [];
      ["主", "主队", "客队", "客"].forEach((zk) => {
        ["+", "-"].forEach((jj) => {
          mywords = mywords.concat([
            `${zk}${jj}${char}`,
            `${zk}让${char}`,
            `${zk}${jj}${char}球`,
            `${zk}让${char}球`,
          ]);
        });
      });

      mapWords[RANG_BALL] = mywords;
    }

    // 半场让球
    if (word === HALF_RANG_BALL) {
      let mywords: string[] = [];
      ["主", "主队", "客队", "客"].forEach((zk) => {
        ["+", "-"].forEach((jj) => {
          mywords = mywords.concat([
            `${zk}半${jj}${char}`,
            `${zk}半场${jj}${char}`,
            `${zk}半让${char}`,
            `${zk}半${jj}${char}球`,
            `${zk}半场${jj}${char}球`,
            `${zk}半让${char}球`,
          ]);
        });
      });

      mapWords[HALF_RANG_BALL] = mywords;
    }

    /** ************************* 让球 end ******************************** */

    /** ************************* 角球让 start ******************************** */
    if (word === RANG_CORNER) {
      let mywords: string[] = [];
      ["主", "主队", "客队", "客"].forEach((zk) => {
        ["+", "-"].forEach((jj) => {
          ["角", "脚"].forEach((jq) => {
            mywords = mywords.concat([
              `${zk}${jj}${char}${jq}`,
              `${zk}让${char}${jq}`,
            ]);
          });
        });
      });

      mapWords[RANG_CORNER] = mywords;
    }

    // 半场让角
    if (word === HALF_RANG_CORNER) {
      let mywords: string[] = [];
      ["主", "主队", "客队", "客"].forEach((zk) => {
        ["+", "-"].forEach((jj) => {
          ["角", "脚"].forEach((jq) => {
            mywords = mywords.concat([
              `${zk}半场${jj}${char}${jq}`,
              `${zk}半${jj}${char}${jq}`,
              `${zk}让${char}${jq}`,
            ]);
          });
        });
      });

      mapWords[HALF_RANG_CORNER] = mywords;
    }
    /** ************************* 角球让 end ******************************** */

    /** ************************* 罚牌让 start ******************************** */
    if (word === RANG_YELLOW_CARD) {
      let mywords: string[] = [];
      ["主", "主队", "客队", "客"].forEach((zk) => {
        ["+", "-"].forEach((jj) => {
          ["罚牌", "牌", "牌子"].forEach((jq) => {
            mywords = mywords.concat([
              `${zk}${jj}${char}${jq}`,
              `${zk}让${char}${jq}`,
            ]);
          });
        });
      });

      mapWords[RANG_YELLOW_CARD] = mywords;
    }

    // 半场让牌
    if (word === HALF_RANG_YELLOW_CARD) {
      let mywords: string[] = [];
      ["主", "主队", "客队", "客"].forEach((zk) => {
        ["+", "-"].forEach((jj) => {
          ["罚牌", "牌", "牌子"].forEach((jq) => {
            mywords = mywords.concat([
              `${zk}半场${jj}${char}${jq}`,
              `${zk}半${jj}${char}${jq}`,
              `${zk}让${char}${jq}`,
            ]);
          });
        });
      });

      mapWords[HALF_RANG_YELLOW_CARD] = mywords;
    }
    /** ************************* 罚牌让 end ******************************** */

    /** ************************* 双进 start ******************************** */
    // 双进-全场;
    if (word === BOTH_GOAL) {
      mapWords[BOTH_GOAL] = [
        "双方均有进球",
        "双进",
        "双飞",
        "双进：是",
        "双方进球",
        "双进是等水",
      ];
    }

    // 上半场双进
    if (word === ONE_HALF_BOTH_GOAL) {
      let mywords: string[] = [];
      mywords = mywords.concat([
        "上半场双进",
        "上半场双飞",
        "上半场双进：是",
        "上半场双方均有进球",
      ]);

      mapWords[ONE_HALF_BOTH_GOAL] = mywords;
    }
    // 下半场双进
    if (word === TWO_HALF_BOTH_GOAL) {
      let mywords: string[] = [];
      mywords = mywords.concat([
        "下半场双进",
        "下半场双飞",
        "下半场双进：是",
        "下半场双方均有进球",
      ]);

      mapWords[TWO_HALF_BOTH_GOAL] = mywords;
    }
    /** ************************* 双进 end ******************************** */

    /** ************************* 比分 start ******************************** */
    // copy一下 RIGHT_SCORE RIGHT_SCORE_ONE_HALF RIGHT_SCORE_TWO_HALF
    if (word === RIGHT_SCORE || word === RIGHT_SCORE_V2) {
      const bifen = [1, 2, 3, 4, 5];
      const mywords: string[] = [];
      bifen.forEach((i) => {
        bifen.forEach((j) => {
          [":", "：", "-"].forEach((s) => {
            mywords.push(`${i}${s}${j}`);
          });
        });
      });
      mywords.push("其他比分");

      mapWords[word] = mywords;
    }
    if (word === RIGHT_SCORE_ONE_HALF) {
      const bifen = [1, 2, 3];
      const mywords = [];
      bifen.forEach((i) => {
        bifen.forEach((j) => {
          [":", "：", "-"].forEach((s) => {
            mywords.push(`${i}${s}${j}`);
          });
        });
      });
      mywords.push("其他比分");

      mapWords[RIGHT_SCORE_ONE_HALF] = mywords;
    }
    if (word === RIGHT_SCORE_TWO_HALF) {
      const bifen = [1, 2, 3];
      const mywords = [];
      bifen.forEach((i) => {
        bifen.forEach((j) => {
          [":", "：", "-"].forEach((s) => {
            mywords.push(`${i}${s}${j}`);
          });
        });
      });
      mywords.push("其他比分");

      mapWords[RIGHT_SCORE_TWO_HALF] = mywords;
    }
    /** ************************* 比分 end ******************************** */

    /** ************************* 进球多半场 start ******************************** */
    if (word === MORE_GOAL_HALF) {
      const mywords = ["下半场进球多", "下半场进球多：是", "上半场进球多"];

      mapWords[MORE_GOAL_HALF] = mywords;
    }
    /** ************************* 进球多半场 end ******************************** */

    // 独赢：主 客 平
    if (word === WIN_DRAW_LOSE) {
      const mywords: string[] = [];
      ["主", "主队", "客", "客队"].forEach((zk) => {
        ["独赢", "胜", "赢"].forEach((y) => {
          mywords.push(`${zk}${y}`);
        });
      });

      mapWords[WIN_DRAW_LOSE] = mywords;
    }
  });

  return mapWords
}